<template>
  <footer class="footer">
    <div class="footer-content">
      <div class="footer-section">
        <h3>关于博客</h3>
        <p>这是一个使用Vue.js和Node.js构建的个人博客系统，欢迎交流学习。</p>
      </div>
      <div class="footer-section">
        <h3>联系方式</h3>
        <ul class="contact-list">
          <li>
            <el-icon><Message /></el-icon>
            <span>Email: example@example.com</span>
          </li>
          <li>
            <el-icon><Location /></el-icon>
            <span>地址: 中国</span>
          </li>
        </ul>
      </div>
      <div class="footer-section">
        <h3>快速链接</h3>
        <ul class="quick-links">
          <li>
            <router-link to="/">首页</router-link>
          </li>
          <li>
            <router-link to="/qa">问答</router-link>
          </li>
          <li>
            <router-link to="/about">关于</router-link>
          </li>
        </ul>
      </div>
    </div>
    <div class="footer-bottom">
      <p>&copy; {{ currentYear }} 个人博客系统. All rights reserved.</p>
    </div>
  </footer>
</template>

<script>
import { ref, computed } from 'vue'
import { Message, Location } from '@element-plus/icons-vue'

export default {
  name: 'FooterComponent',
  components: {
    Message,
    Location
  },
  setup() {
    const currentYear = computed(() => new Date().getFullYear())

    return {
      currentYear
    }
  }
}
</script>

<style scoped>
.footer {
  background-color: #f5f7fa;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 0 20px;
}

.footer-section h3 {
  color: #303133;
  margin-bottom: 20px;
  font-size: 1.2em;
}

.footer-section p {
  color: #606266;
  line-height: 1.6;
}

.contact-list,
.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li,
.quick-links li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  color: #606266;
}

.contact-list .el-icon {
  margin-right: 10px;
  color: #409EFF;
}

.quick-links a {
  color: #606266;
  text-decoration: none;
  transition: color 0.3s;
}

.quick-links a:hover {
  color: #409EFF;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dcdfe6;
  color: #909399;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
</style> 